// Funcion para abrir una nueva ventana popUP
function vpop(pagina) {
window.open(pagina, '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=390,height=460,left = 362,top = 184');
}

// Funcion para abrir una nueva ventana popUP
function vpopWidthSize(pagina) {
window.open(pagina, '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=390,height=200,left = 362,top = 184');
}

// Funcion para cerrar una ventana popUP
function cerrarse(){ 
window.close() 
} 

function vpopUsers(page) {
  var day = new Date();
  var id = day.getTime();
  var URL1 =page;
  var w = 350;
  var h = 280;
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  var scroll = 0;
  eval("page" + id + " = window.open(URL1, '" + id + "', 'top='+wint+',left='+winl+',toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+w+',height='+h);");
}

function vpopRegs(page) {
  var day = new Date();
  var id = day.getTime();
  var URL1 =page;
  var w = 600;
  var h = 400;
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  var scroll = 0;
  eval("page" + id + " = window.open(URL1, '" + id + "', 'top='+wint+',left='+winl+',toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+w+',height='+h);");
}

function desplegarTabla(nombre){
	var span = document.getElementById(nombre);
	if(span.style.display=="block") {
		span.style.display="none";
	} else {
		span.style.display="block";
	}
}

function displayWarningDeactivation(val)
{
	  if(val==0)
	  {
		vpopUsers("/crm/marketing/admin/validateDeactivation.do");
	  }
}